[<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
VS_NoOther()         Ensures that a key is unique

Description:

  VS_NoOther() is a VALID function that the programmer can use to make
  certain that the user has not entered a duplicate database key during
  a GET/READ scenario.

Syntax:     

  l_NoOther = VS_NoOther( KeyValue, [@l_Eating] )

Pass:       

  KeyValue is any valid expression that the represents the "SEEK"
  value for the database key.

  l_Eating is an optional logical expression that can be used in
  place of VS_EatKeys().

Return:     

  l_Success is a logical expression that will be set to .T. if
  KeyValue is NOT in the current database key, otherwise it will be
  .F.    If l_Success is set to .F., VS_NoOther() will present the
  user with a cosmetically appealing pop-up warning message telling
  him/her that the key is a duplicate.

Notes:      


Example:    

  USE CUST INDEX CUST   && Key== CUSTNO

  c_CustNo  = SPACE(5)
  c_Company = SPACE(30)

  @ 5,5  SAY "New Customer Number to add: " GET c_CustNo VALID
  VS_NoOther(c_CustNo)
  @ 10,5 SAY "Company Name? " GET c_Company
  READ
  ...

Usage:      

  VS_NoOther() is a handy method of ensuring that duplicate keys are not
  entered into your databases.

See Also: VS_EatKeys() VS_NotEmpty() VS_NotNeg() VS_NotPos() VS_NotZero()
This page created by ng2html v1.05, the Norton guide to HTML conversion utility. Written by Dave Pearson